/*
 * @Author: 生俊甫 1758142861@qq.com
 * @Date: 2024-10-15 20:27:17
 * @LastEditors: 生俊甫 1758142861@qq.com
 * @LastEditTime: 2024-10-15 20:38:53
 * @FilePath: /sjf/2024-project/2024_centos/test_to_c/graph_test/matrix.hpp
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#pragma once

#include <iostream>
#include <vector>
#include <unordered_map>

#define INT_MAX 100

namespace anwtie
{
template<class T,class W, W MAX_W = INT_MAX, bool Direction = false>
class Graph
{
public:
    Graph(const T* vertexs, int n)
    :_vertexs(vertexs,vertexs + n),_martix(n,std::vector<int>(n,MAX_W))
    {
        for(int i = 0; i < n; i++)
        {
            _v_index_map[vertexs[i]] = i;
        }
    }
private:
    std::vector<T> _vertexs;//顶点集合
    std::unordered_map<T,int> _v_index_map;//顶点下标映射
    std::vector<std::vector<W>> _martix;//邻接矩阵
};
}